package com.ym.manager.admin.goods;

import com.ym.manager.admin.goods.model.GoodsCategory;
import com.ym.utils.Pages;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @program: ym-admin->GoodsCategoryService
 * @Auther: 但何非
 * @Date: 2019/11/27 09:20
 * @Description: 类目
 */
@Service
public class GoodsCategoryService {
    @Autowired
    private GoodsCategoryDao goodsCategoryDao;

    /**
     * 产品列表
     * @return
     */
    public List<GoodsCategory> getCategoryList(int pid) {
        return goodsCategoryDao.getCategoryList(pid);
    }

    /**
     * 获取一级类目佣金
     * @param categoryPid
     * @return
     */
    public Map<String,Object> getRate(int hospital_id,int categoryPid) {
        return goodsCategoryDao.getRate(hospital_id,categoryPid);
    }
}
